import axios from "~/axios";
import { queryParams } from "~/composables/util";

export function getReservation(page, query = {}) {
  let r = queryParams(query);
  return axios.get(`/reservation?page=${page}${r}`);
}

export function createReservation(data) {
  return axios.post("/reservation", data);
}

export function updateProduct(id, data) {
  return axios.put(`/product/${id}`, data);
}

export function deleteProduct(id) {
  return axios.delete("/product/" + id);
}

export function getOneProduct(id) {
  return axios.get("/product/" + id);
}

export function getPrint(page) {
  return axios.get("/print");
}
